'''
Author       : ChangZhY
Date         : 2024-04-09 23:48
LastEditors  : ChangZhY
LastEditTime : 2024-04-09 23:54
Desc         : 
'''
# encoding=utf8

import os
path = "/Users/mac/Downloads/bingo/"

file_list = os.listdir(path)
print(file_list)

for i in file_list:
    if i.endswith(".png"):
        i = i.replace("[", "\\[")
        i = i.replace("]", "\\]")
        i = i.replace(" ", "\\ ")
        cmd = "mv %s %s" % (path + i, path.replace("\\", "/") + i.split("_")[-1])
        print(cmd)
        os.system(cmd)
